Skip to content

chore(ci): add dependency audit and Dependabot - #176

Merged
jeffdupont merged 11 commits into
mainfrom
chore/ci-dependency-audit-dependabot
Nov 2, 2026
Merged

jeffdupont merged 11 commits into
mainfrom
chore/ci-dependency-audit-dependabot

Conversation

@jeffdupont

@jeffdupont jeffdupont commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Dependency audit in CI: new make audit target that runs pip-audit (pinned 2.9.0) over uv export --frozen of the committed uv.lock, and a Dependency audit CI job that runs it. It audits the lock as committed (no uv lock first), so a vulnerable pin fails the job. It does not block PRs; push to main and a weekly Monday cron fail on it.
  • Dependabot: .github/dependabot.yml with uv daily at the workspace root and github-actions weekly (workflows and the composite actions), both with a 7-day cooldown — same shape as go-ai-sdk (go-ai-sdk#3).

CI-only: no uv.lock, source or test changes. The dependency upgrades this PR used to carry are in #257.

Expected failure

The Dependency audit check fails on this PR because it audits main's current lock. That is the job working, and it does not block merge on PRs. It keeps failing on main until #257 lands; with #257's lock, make audit reports no known vulnerabilities.

Verified locally

ruff check, ruff format --check and mypy packages/*/src clean; pytest 3851 passed, 18 skipped on a clean checkout of this branch.

🤖 Generated with Claude Code


Note

Overview
Adds automated dependency hygiene: a local make audit target and a matching Dependency audit CI job that scan the committed uv.lock (via frozen uv export + pinned pip-audit@2.9.0) without re-locking first, so known vulnerable pins surface on push to main and on a weekly Monday CI schedule. On pull requests, the audit job is allowed to fail (continue-on-error) so unrelated PRs are not blocked by advisories against the current lock.

Also introduces .github/dependabot.yml to propose daily uv updates at the workspace root and weekly GitHub Actions bumps for workflows and composite actions, each with a 7-day cooldown.

Reviewed by Cursor Bugbot for commit ea50e67. Bugbot is set up for automated code reviews on this repo. Configure here.

- Add `make audit` (pip-audit 2.9.0 over `uv export` of the committed
  uv.lock) and a CI job that runs it.
- Add dependabot.yml: uv daily at the workspace root, github-actions weekly,
  7-day cooldown, matching go-ai-sdk.
- Upgrade the locked versions that pip-audit flagged (26 advisories):
  anyio 4.15.1, langgraph-sdk 0.4.7, mcp 1.30.0, pyjwt 2.15.1,
  urllib3 2.8.0, virtualenv 21.14.7. No pyproject ranges changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bcc3de1. Configure here.

Comment thread Makefile Resolved
jeffdupont and others added 2 commits October 20, 2026 15:36
make runs /bin/sh, which has no pipefail, so piping uv export into
pip-audit took pip-audit's exit code: a failed export audited an empty
list and passed. Export to a temp file and chain the steps instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
directory '/' covers .github/workflows only, so astral-sh/setup-uv in the
ci composite action never got update PRs. List .github/actions/* as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeffdupont
jeffdupont force-pushed the chore/ci-dependency-audit-dependabot branch from 91c6752 to cac7f68 Compare October 20, 2026 22:36
jeffdupont and others added 3 commits October 23, 2026 12:15
…udit-dependabot

uv.lock is taken from main and regenerated, not hand-merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uv lock -P for brotlicffi, claude-agent-sdk, virtualenv and the
OpenTelemetry packages. make audit now reports no known vulnerabilities.

claude-agent-sdk 0.2.173 adds four ClaudeAgentOptions fields. None is a
model or run setting, so all four go on the excluded list:
resume_session_at and resume_drops_turn are session state,
forward_subagent_text is stream shape, and verbatim_prompts decides
whether prompt text can make Claude Code read host files.

OpenTelemetry 1.45 logs a malformed OTEL_EXPORTER_OTLP_TIMEOUT and uses
its default instead of raising, so the lifecycle test that relied on
that now injects the telemetry failure directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A newly published advisory fails every open PR at once, none of which
caused it. On pull_request the audit job now reports without failing
the run; on push to main and on the new weekly schedule it still fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeffdupont

Copy link
Copy Markdown
Contributor Author

Pushed three commits:

  • a52a220 merges origin/main. uv.lock was taken from main and regenerated, not hand-merged. The Makefile .PHONY line keeps both api-report targets and audit.
  • 2210f7b runs uv lock -P for brotlicffi, claude-agent-sdk, virtualenv and the OpenTelemetry packages. make audit now reports no known vulnerabilities. Two fixes the upgrade needed:
    • claude-agent-sdk 0.2.173 adds four ClaudeAgentOptions fields. All four go on the excluded list: resume_session_at and resume_drops_turn (session state), forward_subagent_text (stream shape), verbatim_prompts (whether prompt text can make Claude Code read host files).
    • OpenTelemetry 1.45 no longer raises on a malformed OTEL_EXPORTER_OTLP_TIMEOUT, so test_a_failed_telemetry_setup_leaves_no_client_behind now injects the failure itself.
  • ce4c397 makes the audit job continue-on-error on pull_request only, and adds a weekly schedule (Mondays 13:00 UTC).

Needs a human reviewer.

🤖 Generated with Claude Code

jeffdupont and others added 4 commits November 2, 2026 07:57
Makefile: keep main's check-packaging target and this branch's audit
target in .PHONY. uv.lock: rebuilt from main's lock plus this branch's
upgrades (claude-agent-sdk 0.2.173, OpenTelemetry 1.45.1 / 0.66b1); the
line-merged lock failed `uv lock --check`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit 2210f7b.

The dependency upgrades, and the handler.py and test_lifecycle.py changes
that came with them, move to their own PR so this one stays CI-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The revert of the dependency upgrades restored a pre-merge lock that
downgrades virtualenv below main. This PR is CI-only, so the lock
matches main exactly; the upgrades are in their own PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeffdupont

Copy link
Copy Markdown
Contributor Author

The dependency upgrades (and the handler and lifecycle-test changes that came with them) moved to #257, so this PR is CI-only now: the audit target, the CI job and Dependabot. The Dependency audit check here is expected to fail until #257 lands, since it audits main's lock.

jeffdupont added a commit that referenced this pull request Nov 2, 2026
## What

Upgrades the locked packages that `pip-audit` flags, split out of #176
so that PR stays CI-only. No `pyproject.toml` ranges changed; `uv lock
-P` for each package:

| Package | `main` | This PR |
|---|---|---|
| claude-agent-sdk | 0.2.121 | 0.2.176 |
| opentelemetry-api / -sdk / -proto / -exporter-otlp-proto-* | 1.43.0 |
1.45.2 |
| opentelemetry-semantic-conventions | 0.64b0 | 0.66b2 |
| opentelemetry-exporter-http-transport, -otlp-common | — | 0.66b2 (new)
|
| virtualenv | 21.14.13 | 21.15.2 |
| litellm | 1.106.2 | 1.103.10 |
| filelock | 3.29.4 | 4.2.7 |
| boto3 / botocore | 1.43.101 | 1.43.123 (litellm 1.103.10 requires
`boto3>=1.43.117`) |

brotlicffi was also in the `uv lock -P` set; `main` already has the
fixed 1.2.1.0, so it does not change.

The lock also records the workspace members' 1.0.0 versions; `main`'s
lock still lists the pre-1.0 versions, so `uv lock --check` fails on
`main`.

Changes the upgrades need:

- **Claude Agents handler**: claude-agent-sdk added four
`ClaudeAgentOptions` fields (`resume_session_at`, `resume_drops_turn`,
`forward_subagent_text`, `verbatim_prompts`). None is a model or run
setting, so all four go on the excluded list and a config cannot set
them. `verbatim_prompts` matters most: it decides whether prompt text
can make Claude Code read host files, which is the application's call.
- **Lifecycle test**: OpenTelemetry 1.45 logs a malformed
`OTEL_EXPORTER_OTLP_TIMEOUT` and falls back to its default instead of
raising, so the failed-telemetry test now makes `_setup_telemetry` raise
directly. The BYOC comment in `lifecycle.py` drops the same example.

## Why litellm goes back to 1.103.10

`filelock` 3.29.4 has 9 advisories (GHSA-fq56-3cx3-fjxp and others), all
fixed only in 4.x, and litellm 1.106.x requires `filelock<4`. litellm
patches several release lines in parallel: 1.103.10 is from 2026-10-27,
newer than the 1.106.2 locked on `main` (2026-10-21), and it does not
pin `filelock`. So the lock uses `uv lock -P litellm==1.103.10 -P
filelock`.

This only changes what CI and local development install. The published
`litellm>=1.83.0` floor in `packages/litellm-messages/pyproject.toml` is
unchanged, so users still resolve litellm themselves.

## Verified locally

- `ruff check`, `ruff format --check`, `mypy packages/*/src`: clean.
- `pytest`: 3851 passed, 18 skipped.
- `uv lock --check` and the API report check: clean.
- `make audit` (from #176) on this lock: no known vulnerabilities.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Overview**
> This PR refreshes **`uv.lock`** for packages **`pip-audit`** flagged:
**`claude-agent-sdk`** (0.2.121 → 0.2.176), **OpenTelemetry** (1.43 →
1.45.2, plus new OTLP helper packages), **`filelock`** (4.x),
**`boto3`/`botocore`**, and **`virtualenv`**. **`litellm`** is
intentionally locked to **1.103.10** (below 1.106.x) so **`filelock`
4.x** can ship without litellm’s **`filelock<4`** pin; published
**`litellm>=1.83.0`** floors in pyproject are unchanged.
> 
> **Claude Agents** adds four new **`ClaudeAgentOptions`** fields from
the SDK upgrade to **`_CLAUDE_AGENT_OPTIONS_EXCLUDED_KEYS`**
(`resume_session_at`, `resume_drops_turn`, `forward_subagent_text`,
**`verbatim_prompts`**) so remote config cannot drive session resume,
subagent streaming, or **`@path`** / slash-command expansion on the
host.
> 
> **Lifecycle tests** no longer rely on a malformed
**`OTEL_EXPORTER_OTLP_TIMEOUT`** to fail telemetry setup (OTel 1.45 logs
and defaults instead); they **`patch`** **`_setup_telemetry`** to raise.
A related BYOC comment in **`lifecycle.py`** is trimmed to match.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
6cab6ec. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@jeffdupont
jeffdupont merged commit dbb5acb into main Nov 2, 2026
12 checks passed
@jeffdupont
jeffdupont deleted the chore/ci-dependency-audit-dependabot branch November 2, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants